<#assign contextPath=springMacroRequestContext.getContextPath() />
<#import "/public/frame/main.html" as frame />
<@frame.head "南航明珠商城-商品列表">
</@frame.head>
<link rel="stylesheet" type="text/css" href="${contextPath}/resources/css/search_table.css" />
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 后台管理中心 <span class="c-gray en">&gt;</span>订单管理 <span class="c-gray en">&gt;</span> 里程退还列表  <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
<form method="post" name="query_order_form"  id="query_order" action="${contextPath}/order/query_cancle_mileage_info_list" >    
   <input type="hidden" name="page" value="${pagination.pageNo}"  id="page" />                         
    <div class="text-c">
        <table class="table search_table">
           <tr>  
           <td>订单编号：</td>
           <td><input type="text" class="input-text  radius" placeholder="订单编号" id="orderNo" name="orderNo" value="${(cancleMileageInfoQo.orderNo?c)!}" ></td>
           <td>里程状态：</td>
           <td>
           <span class="select-box radius">
          <select class="select"  name="state" onchange="thisValueForState(this.value)" id="state">
               <option value ="" >里程退还状态</option>
               <option value ="0" <#if cancleMileageInfoQo.state==0 >selected="selected"</#if> >未退还</option>
               <option value ="1" <#if cancleMileageInfoQo.state==1 >selected="selected"</#if> >已退还</option>  
           </select>
           	<input type="hidden" name="cancleMileageInfoQo.state" value="" id="cancleMileageInfoQo.state">
           </span>
           </td>      
            <td>下单时间：</td>
          	<td> 
          	<input 	onfocus="WdatePicker({ maxDate:'#F{$dp.$D(\'endDate\')||\'%y-%M-%d\'}',readOnly: true })" 
          			id="startDate" name="createOrderstartDate" value="<#if cancleMileageInfoQo.createOrderstartDate?? >${cancleMileageInfoQo.createOrderstartDate?date}</#if>" 
           			class="input-text Wdate" style="width:45%;" readonly="" type="text">
                                                至
               <input onfocus="WdatePicker({ minDate:'#F{$dp.$D(\'startDate\')}',maxDate:'%y-%M-%d',readOnly: true })"
               			id="endDate"   name="createOrderEndDate" value="<#if cancleMileageInfoQo.createOrderEndDate?? >${cancleMileageInfoQo.createOrderEndDate?date}</#if>" 
               			class="input-text Wdate" style="width:45%;" type="text">
           </td>
         </tr>
         <tr><td colspan="6" style="text-align:center;" >
           <input class="btn btn-success radius" type="button"  onclick="search();"  value="搜索" />
           <input class="btn btn-success radius" type="button"  onclick="toIsEmpty();" value="重置" />
           <input class="btn btn-success radius" type="button"  onclick="search();"   value="刷新" />
           <input class="btn btn-success radius" type="button"  onclick="exportList('${contextPath}');"   value="导出" />
             </td>
         </tr>
      </table>
    </div>
</form>

    <div class="cl pd-5 bg-1 bk-gray mt-20"> 
  
    
    <span class="r">共有数据：<strong> ${pagination.totalCount} </strong> 条</span> </div>
    <table class="table table-border table-bordered table-bg">
        <thead>
        
        <tr   class="text-c">
            <th >撤销编号</th>
            <th >订单编号</th>
            <th >里程数</th>
           
            <th >状态</th>
            <th >描述</th>
            <th width="150" > 操作</th>
        </tr>
        </thead>
        <tbody>
       <#if pagination.list?? && (pagination.list?size &gt; 0) >
        <#list pagination.list as orders> 
        	 <tr  class="text-c">
                 <td >${orders.cancleMileageInfoId?c}</td>
                 <td >${orders.order.id?c}  </td>
                 <td > ${orders.mileage?c} </td>
                 <td >  
                  <#if orders.state==0 >未退还    
                  <#elseif orders.state==1  >已退还
                 </#if>   </td>
                 <td width="320px"> ${orders.description} </td>
                 <td > 
                   <#if orders.state==0 ><a  href="javaScript:toCancle(${orders.cancleMileageInfoId})" >退还</a>
                   <#elseif orders.state==1  > 
                   </#if> 
                 </td>
                 
                   <!-- <s:if test="#cancleMileageInfo.state==0"><a id="<s:property value="cancleMileageInfoId"/>" href="javaScript:toCancle(${cancleMileageInfo.cancleMileageInfoId},${cancleMileageInfo.cancleMileageInfoId})" >退还</a> </s:if> -->
       		 </tr>
      </#list></#if>
     </tbody>
    </table>
    <div id="biuuu_city" style="padding-top: 10px;float: right"></div>
</div>
<@frame.end "default">
</@frame.end>

<script type="text/javascript" src="${contextPath}/resources/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/laypage/laypage.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/order/cancle_mileage.js"></script>
<script type="text/javascript">
var path="${contextPath}";
laypage({
    cont: 'biuuu_city',//容器。值支持id名、原生dom对象，jquery对象。
    pages: ${pagination.totalPage},//通过后台拿到的总页数
    curr:  ${pagination.pageNo} || 1, //当前页
    skip: true, //是否开启跳页
	first: 1, //将首页显示为数字1,。若不显示，设置false即可
	last: ${pagination.totalPage}, //将尾页显示为总页数。若不显示，设置false即可
    jump: function(obj , first){//触发分页后的回调
        if(!first){ //点击跳页触发函数;当前页为obj.curr
          $(page).val(obj.curr);//获取点击的页码
          $(query_order_form).submit();
        }
    }
});
$(function() {
	// 当由其他功能跳转到该页面时需要这个处理
	$("li[class='active']", window.parent.document).find("span").attr("data-href", path + "/order/query_cancle_mileage_info_list");
	$("li[class='active']", window.parent.document).find("span").text("里程退还列表");
});
</script>
</body>

</html>
 
